<?php

namespace Home\Model;
use Think\Model;
class ParcelNoticeModel extends BaseModel{
    
    //短信微信记录表
    protected $tableName = 'tp_parcel_notice';
    
    /**
     * @desc 短信状态更改
     * @author quyang
     * @update 2016-11-29
     */
    public function smsNotice($code,$status){
        $times = date('YmdHis',time());
        $where = array('f_parcel_id'=>$code,'f_sms_notice'=>$status,'f_success_time'=>$times);
        $this->add($where);
    }
    
    /**
     * @desc 查询微信发送状态
     * @author quyang
     * @update 2016-11-29
     */
    public function getStatus($code){
        $where = array('f_parcel_id'=>$code);
        $data = $this->find($where);
        return $data;
    }
}